﻿using System;
using System.Collections.Generic;
using System.Web.UI.WebControls;
using BLL.RF.ProductCategory;
using Model.RF.ProductCategory;

public partial class ProductManage_RFProductManage_View_ProductType_Flow_ChangeLog_ViewbyDT : System.Web.UI.Page
{
    private DateTime dt1
    {
        get { return DateTime.Parse(ViewState["dt1"].ToString()); }
        set { ViewState["dt1"] = value; }
    }
    private DateTime dt2
    {
        get { return DateTime.Parse(ViewState["dt2"].ToString()); }
        set { ViewState["dt2"] = value; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
        }
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        dt1 = DateTime.Parse(this.TextBox1.Value.Trim());
        dt2 = DateTime.Parse(this.TextBox2.Value.Trim());
        BindTests();
    }

    protected void BindTests()
    {
        ProductType_Flow_ChangeLog test = new ProductType_Flow_ChangeLog();
        IList<ProductType_Flow_ChangeLogInfo> list = test.ProductType_Flow_ChangeLog_GetbyDT(dt1, dt2);
        GridView1.DataSource = list;
        GridView1.DataBind();
    }

    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.GridView1.PageIndex = e.NewPageIndex;
        BindTests();
    }
}
